public class Main {
    public static void main(String[] args) {
        Solution solution = new Solution();
        int[][] pairs = new int[][]{{1,2},{2,3},{3,4}};
        System.out.println(solution.findLongestChain(pairs));
        int[] arr = new int[]{1,2,3,4};
        System.out.println(solution.longestSubsequence(arr,1));
    }
}
